<html>
<head><meta charset="utf-8"><title>target/ dir path for crates · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html">target/ dir path for crates</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209303455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209303455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209303455">(Sep 07 2020 at 14:48)</a>:</h4>
<p>I'm exploring removing the hard requirement on x.py in favor of directly invoking rustbuild, and it seems like there's no good way for rustbuild to learn where its binaries will be placed. My current idea is to manually synthesize the path from the OUT_DIR of the build script.</p>
<p>Maybe we could set CARGO_BIN_EXE_&lt;name&gt; for libraries, with the caveat that the binary may not exist or be outdated or whatever? FWIW rustbuild would love a "always build the binaries too" feature or something along those lines.</p>



<a name="209303541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209303541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209303541">(Sep 07 2020 at 14:49)</a>:</h4>
<p>I guess the alternative is to remove the multiple-binary situation rustbuild currently has, stuff everything into one binary, and then use the argv[0] to dispatch to the appropriate main</p>



<a name="209303547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209303547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209303547">(Sep 07 2020 at 14:49)</a>:</h4>
<p>that'd be really annoying though :/</p>



<a name="209303620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209303620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209303620">(Sep 07 2020 at 14:50)</a>:</h4>
<p>(and to some extent, given that current_exe doesn't work everywhere, not a solution anyway)</p>



<a name="209303637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209303637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209303637">(Sep 07 2020 at 14:50)</a>:</h4>
<p>Can you elaborate a little on what you need to be able to find?</p>



<a name="209303676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209303676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209303676">(Sep 07 2020 at 14:50)</a>:</h4>
<p>I would generally like cargo to provide more information like this.</p>



<a name="209304026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304026">(Sep 07 2020 at 14:54)</a>:</h4>
<p>I want to find the binaries of bin/rustc.rs bin/rustdoc.rs etc</p>



<a name="209304112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304112">(Sep 07 2020 at 14:55)</a>:</h4>
<p>To some extent I think the challenge we'll face is that (AFAIK) there's not currently a good way to tell cargo "my library uses these binaries"</p>



<a name="209304135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304135">(Sep 07 2020 at 14:55)</a>:</h4>
<p>(or "this binary uses these other binaries")</p>



<a name="209304152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304152">(Sep 07 2020 at 14:55)</a>:</h4>
<p>so a cargo run wouldn't build enough for rustbuild to work well</p>



<a name="209304227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304227">(Sep 07 2020 at 14:56)</a>:</h4>
<p>rustc-perf also has this problem, you have to use <code>cargo build &amp;&amp; target/debug/collector</code>, not <code>cargo run collector</code></p>



<a name="209304229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304229">(Sep 07 2020 at 14:56)</a>:</h4>
<p>Ah, got it. We have an open feature request for exactly this, and it's something I would really like.</p>



<a name="209304245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304245">(Sep 07 2020 at 14:56)</a>:</h4>
<p>because otherwise the <code>fake-rustc</code> won't be built</p>



<a name="209304253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304253">(Sep 07 2020 at 14:56)</a>:</h4>
<p>One moment...</p>



<a name="209304428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304428">(Sep 07 2020 at 14:57)</a>:</h4>
<p><a href="https://github.com/rust-lang/cargo/issues/4316">https://github.com/rust-lang/cargo/issues/4316</a></p>



<a name="209304516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304516">(Sep 07 2020 at 14:58)</a>:</h4>
<p>There's some partial implementation linked from there as well.</p>



<a name="209304595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304595">(Sep 07 2020 at 14:59)</a>:</h4>
<p>Hm that looks interesting</p>



<a name="209304599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304599">(Sep 07 2020 at 14:59)</a>:</h4>
<p>It also looks "hard"</p>



<a name="209304610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304610">(Sep 07 2020 at 14:59)</a>:</h4>
<p>Not as much as you would think.</p>



<a name="209304702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304702">(Sep 07 2020 at 15:00)</a>:</h4>
<p>well I mean it seems like there's an open RFC?</p>



<a name="209304735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304735">(Sep 07 2020 at 15:00)</a>:</h4>
<p>It's not so much hard as bikesheddy. ;)</p>



<a name="209304756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304756">(Sep 07 2020 at 15:00)</a>:</h4>
<p>not necessarily from an impl perspective, I'm just saying that it doesn't seem like something we would be able to roll out even in unstable relatively quickly</p>



<a name="209304778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304778">(Sep 07 2020 at 15:01)</a>:</h4>
<p>For instance, what syntax do we use for declaring a dependency on a binary.</p>



<a name="209304781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304781">(Sep 07 2020 at 15:01)</a>:</h4>
<p>and given that the multiple-entry binary solves most of the problems anyway...</p>



<a name="209304814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304814">(Sep 07 2020 at 15:01)</a>:</h4>
<p>I guess I'm saying that I don't really want to personally try and drive that bikeshed</p>



<a name="209304820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304820">(Sep 07 2020 at 15:01)</a>:</h4>
<p>Fair.</p>



<a name="209304943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304943">(Sep 07 2020 at 15:02)</a>:</h4>
<p>Had to try. ;)</p>



<a name="209304974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/target/%20dir%20path%20for%20crates/near/209304974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/target.2F.20dir.20path.20for.20crates.html#209304974">(Sep 07 2020 at 15:03)</a>:</h4>
<p>heh</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>